import 'package:flutter/cupertino.dart';

class BtMiddleEntryModel extends ChangeNotifier {
  bool _isLoading = false;

  bool get isLoading => _isLoading;

  String _error = '';

  String get error => _error;

  String _authType = '';

  BtMiddleEntryModel(String authType) {
    _authType = authType;
    switch (_authType) {
      case '1':
        checkResident();
        break;
    }
  }

  Future<void> checkResident() async {
    try {
      _isLoading = true;
      notifyListeners();

      //int code = await checkResidentStatus();

      _isLoading = false;
      notifyListeners();
    } catch (error) {
      _error = error.toString();
      _isLoading = false;
      notifyListeners();
    }
  }
}
